import { axios } from '@/utils/request'

const api = {

  //新建器材
  materialAdd:'/teacherapi/material/materialAdd',
  materialDelete:'/teacherapi/material/materialDelete',
  materialEdit:'/teacherapi/material/materialEdit',
  materialDetail:'/teacherapi/material/materialDetail',
  materialList:'/teacherapi/material/materialList',

  //收藏模块
  collectionAdd:'/teacherapi/experiment/collectionAdd',
  collectionDelete:'/teacherapi/experiment/collectionDelete',
  subjectOptions: '/teacherapi/experiment/subjectOptions',


}

export default api

export function subjectOptions(parameter) {
  return axios({
    url: api.subjectOptions,
    method: 'get',
    params: parameter
  })
}

export function collectionAdd(parameter) {
  return axios({
    url: api.collectionAdd,
    method: 'post',
    data: parameter
  })
}

export function collectionDelete(parameter) {
  console.log('collectionDelete');
  return axios({
    url: api.collectionDelete,
    method: 'post',
    data: parameter
  })
}


//新建实验器材
export function materialAdd(parameter) {
  return axios({
    url: api.materialAdd,
    method: 'post',
    data: parameter
  })
}

export function materialDelete(parameter) {
  return axios({
    url: api.materialDelete,
    method: 'post',
    data: parameter
  })
}

export function materialEdit(parameter) {
  return axios({
    url: api.materialEdit,
    method: 'get',
    params: parameter
  })
}

export function materialDetail(parameter) {
  return axios({
    url: api.materialDetail,
    method: 'post',
    data: parameter
  })
}

//获取    materialList
export function getMaterialList(parameter) {
  return axios({
    url: api.materialList,
    method: 'get',
    params: parameter
  })
}

